set(LibXern_SRCS
	Console.cpp
	DataStream.cpp
	DataFilter.cpp
	Engine.cpp
	Entity.cpp
	FileSystem.cpp
	FileSystem_Win32.cpp
	FileSystem_Unix.cpp
	FilterStream.cpp
	GlobalEntityFactory.cpp
	Hashes.cpp
	Json.cpp
	LightEntity.cpp
	Log.cpp
	Plugin.cpp
	PluginFactory.cpp
	PluginRegistry.cpp
	Region.cpp
	RegionLoader.cpp
	ResourceGroup.cpp
	ResourceManager.cpp	
	StringTable.cpp
	WorldManager.cpp
	
	# TinyXML source code.
	tinyxml.cpp
	tinyxmlerror.cpp
	tinyxmlparser.cpp
)

set(LibMiniXern_SRCS
	DataStream.cpp
	DataFilter.cpp
	FileSystem.cpp
	FileSystem_Win32.cpp
	FileSystem_Unix.cpp
	FilterStream.cpp
	Json.cpp
	StringTable.cpp
	
	# TinyXML source code.
	tinyxml.cpp
	tinyxmlerror.cpp
	tinyxmlparser.cpp
)

add_library(Xern SHARED ${LibXern_SRCS})
target_link_libraries(Xern ${COMMON_LIBRARIES} crypto++)

add_library(MiniXern STATIC ${LibMiniXern_SRCS})
target_link_libraries(MiniXern ${COMMON_LIBRARIES}) 
